/**
 * 
 */
package dms.service;

import java.util.Date;

import dms.model.Building;
import dms.model.Dormitory;
import dms.model.form.Repair;
import dms.model.util.PageIterator;

/**
 * @author 李健
 *
 */
public interface RepairQueryService {

	Repair findRepairById(Long id);
	
	PageIterator<Repair> findByBuilding(int start, int count, Building building);
	
	PageIterator<Repair> findByBuildingAndDate(int start, int count, Date fromDate, Date toDate, Building building);
	
	PageIterator<Repair> findByDormitory(int start, int count, Dormitory dormitory);
	
	PageIterator<Repair> findByDormitoryAndDate(int start, int count, Date fromDate, Date toDate, Dormitory dormitory);
	
	/**
	 * 
	 * @param start
	 * @param count
	 * @param fromDate
	 * @param toDate
	 * @param processed 是否已经开始受理
	 * @param applied 是否已经处理完成
	 * @return
	 */
	PageIterator<Repair> findByBuildingAndProcessed(int start, int count, Building building, Date fromDate, Date toDate, Boolean processed, Boolean applied);

	/**
	 * 
	 * @param start
	 * @param count
	 * @param processed 是否已经开始受理
	 * @param applied 是否已经处理完成
	 * @return
	 */
	PageIterator<Repair> findByBuildingAndProcessed(int start, int count, Building building, Boolean processed, Boolean applied);

}
